<?php
header('Content-Type:json;charset=utf-8 ');

//$word = "出る";
//$word = "で";
//$word = "る";
$word = $_POST['w'];

require_once "HuJiang.php";

$result = HuJiang::findWord($word);

$re = [];
if ($result) {
    $re['word'] = $result;
    $re['success'] = true;
//    var_dump($result);
} else {
    $re['success'] = false;
    $re['msg'] = "该单词没有查询结果！";
}

echo json_encode($re);